﻿using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

namespace IMClient.Converters
{
    public class MessageBackgroundConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isSentByUser = (bool)value;
            return isSentByUser ? new SolidColorBrush((Color)ColorConverter.ConvertFromString("#95EC69"))
                               : new SolidColorBrush((Color)ColorConverter.ConvertFromString("#eeeeee"));
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

}
